package cn.test.app.b.controller;

import cn.ifloat.brick.sprofile.web.common.BasicController;
import cn.test.app.a.api.OrderApi;
import cn.test.app.a.domain.Ord;
import cn.test.app.a.vo.OrdVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("order")
public class OrderController extends BasicController {
    @Resource
    private OrderApi orderApi;

    @PostConstruct
    public void init() {
        System.err.println("case-server2 orderController init");
    }

    @GetMapping("list")
    public List<Ord> list(OrdVo ordVo) {
        return orderApi.list(ordVo);
    }
    @GetMapping("test")
    public String test() {
        System.err.println("访问到了");
        return "事实上生活时尚事实上生活时尚事实上生活时尚事实上生活时尚事实上生活时尚事实上生活时尚事实上生活时尚事实上生活时尚";
    }

}
